package com.mkvld.appietijdenv2.adapters;

import com.mkvld.appietijdenv2.fragments.PeriodFragV9;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class AdapPeriodFrags extends FragmentPagerAdapter {
	PeriodFragV9[] frags;
	String[] fragTitles;
	public AdapPeriodFrags(FragmentManager fm, PeriodFragV9[] frags, String[] fragTitles) {
		super(fm);
		this.frags = frags;
		this.fragTitles = fragTitles;
	}

	@Override
	public Fragment getItem(int position) {
		return frags[position];
	}
	
	@Override
	public CharSequence getPageTitle(int position) {
		if (fragTitles != null)
			return fragTitles[position];
		
		return "";
	}

	@Override
	public int getCount() {
		return frags.length;
	}

}
